<template>
  <div class='choose'>
    <span v-if="change" class="choose-adviser" @click="changeAdviser">选择顾问</span>
    <span v-else><img :src="getInfo.state==1?imgs.select.selected:imgs.select.noSelected" alt=""  @click="selectThis(getInfo)"></span>
  </div>
</template>
<script>
export default {
  props:["change","info"],
  components: {},
  name: "",
  data() {
    return {
      imgs:{
        select:{
          noSelected:require('../../../assets/img/hpmepage/renew/choose.png'),
          selected:require('../../../assets/img/hpmepage/renew/choose_1.png')
        }
      },
    };
  },
  computed:{
    getInfo(){
      return this.info||{}
    }
  },
  methods: {
    changeAdviser(){
      this.$router.push("/advisers/change/"+this.info.type+"/"+this.info.id)
    },

    selectThis(info){
      info.click(info)
    }
  },
  
  created() {

  }
};
</script>
<style lang="scss" scoped>
.choose {

  .choose-adviser{
    color: #FF9F20;
    font-size: 12px;
  }
  img{
    width: 25px;
    height: 25px;
  }
}
</style>